<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let obj = {
        //     list:[1,2,3],
        //     study:{
        //         ball:['篮球','足球'],
        //         fruits:['榴莲','百香果','杨桃']
        //     }
        // } 
        // let obj = {
        //     list:['aa','bb','cc'],
        //     hobby:{
        //         ball:['篮球','足球','乒乓球'],
        //         fruits:['榴莲','百香果','杨桃']
        //     }
        // }

        // let {list,hobby,list:[a,b,c]} = obj
        // console.log(list);
        // console.log(hobby);
        // console.log(hobby.fruits);
        // console.log(a);
        // console.log(b);
        // console.log(c);


        let zhao = {
            name:'狗东',
            age:100,
            shabi: function() {
                console.log('狗东，爷是你爹');
            }
        }
        // let {name,age,shabi} = zhao;
        // console.log(name);
        // console.log(age);
        // console.log(shabi);
        // shabi()
        let {shabi} = zhao;
        shabi();


        // 对象的简化写法
        let name = 'goudong';
        let change = function(){
            console.log('我是孙宇东他爹');
        }
        let scool = {
            name,
            change,

            // 方法的简写
            fangfa(){
                console.log('我是狗东他爷');
            }
        }
        console.log(scool);
        console.log(scool.change);
        console.log(scool.fangfa);
    </script>
</body>
</html>